import {
	createRouter,
	createWebHashHistory
} from 'vue-router';


const Enter = () => import("../views/enter.vue");
const Home = () => import("../views/home/home.vue");
const School = () => import("../views/school.vue");
const SchoolInfo = () => import("../views/schoolInfo/schoolInfo.vue");
const SchoolQuery = () => import('../views/school/schoolQuery.vue');
const SchoolComparison = () => import('../views/school/schoolComparison.vue');
const Major = () => import('../views/major.vue');
const MajorInfo = () => import('../views/majorInfo/majorInfo.vue');
const UserLogin = () => import('../views/login/UserLogin.vue');
const Chat = () => import("../views/Chat");
const Main = () => import("../views/admin/main.vue");
const UserAdmin = () => import("../views/admin/userAdmin.vue");
const StuAdmin = () => import("../views/admin/stuAdmin.vue");
const ConsultAdmin = () => import("../views/admin/consultAdmin.vue");
const Mnzy = () => import("../views/mnzy/mnzy.vue");
const Echarts = () => import("../views/echarts/echarts.vue");

const routes = [{
		path: '/',
		name: 'Enter',
		component: Enter,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/home',
		name: 'Home',
		component: Home,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/school',
		name: 'School',
		component: School,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/schoolInfo',
		name: 'SchoolInfo',
		component: SchoolInfo,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/schoolQuery',
		name: 'SchoolQuery',
		component: SchoolQuery,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/schoolComparison',
		name: 'SchoolComparison',
		component: SchoolComparison,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/major',
		name: 'Major',
		component: Major,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/majorInfo',
		name: 'MajorInfo',
		component: MajorInfo,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/userlogin',
		name: 'UserLogin',
		component: UserLogin,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/chat',
		name: 'Chat',
		component: Chat,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/mnzy',
		name: 'Mnzy',
		component: Mnzy,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/echarts',
		name: 'Echarts',
		component: Echarts,
		meta: {
			// 页面标题title
			title: '冰冰高考志愿服务平台'
		}
	},
	{
		path: '/main',
		name: 'Main',
		component: Main,
		children: [{
				path: '/userAdmin',
				name: 'UserAdmin',
				component: UserAdmin
			},
			{
				path: '/stuAdmin',
				name: 'StuAdmin',
				component: StuAdmin
			},
			{
				path: '/consultAdmin',
				name: 'ConsultAdmin',
				component: ConsultAdmin
			}

		]
	}
]


const router = createRouter({
	history: createWebHashHistory(),
	routes
});

export default router
